package net.atomarrow.db.orm.listener;

public interface OrmListener {

    public static final String RESULT_NO_CHANGE="RESULT_NO_CHANGE";
    /**
     * 是否监听
     * @param clazz
     * @return
     */
    public boolean isListen(Class clazz);
    /**
     * 更换字段名
     * @param clazz
     * @param fieldName
     * @return
     */
    public String changeFieldName(Class clazz,String fieldName);
    /**
     * 更换内容
     * @param clazz
     * @param fieldName
     * @param obj
     * @param value2
     * @return
     */
    public Object changeValue(Class clazz,String fieldName,Object obj, Object value);
    /**
     * 是否禁止赋值
     * @param clazz
     * @param fieldName
     * @return
     */
    public boolean forbid(Class clazz,String fieldName);
}
